
import ajax from '@/utils/ajax'
import dialog from '@/utils/dialog'
import cookie from '@/utils/cookie'

export default function (query) {
  const iphone = cookie.getCookie('name');
  return ajax({
    url: `/f/empOrder/detail?iphone=${iphone}&id=${query.id}`,
    loading: true,
    isNeedLogin: true, // 需要登录
    data: {
      iphone,
      id: query.id
    },
  }).then(data => data || {}).catch(() => dialog.showToast('请求失败'))
}
